package com.agp.service.impl;

import com.agp.mapper.TreeMediaMapper;
import com.agp.service.TreeMediaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TreeMediaServiceImpl implements TreeMediaService {
    @Autowired
    private TreeMediaMapper treeMediaMapper;

    //批量保存图片
    @Override
    public void save(List<String> urls, Integer treeId) {
        treeMediaMapper.insert(urls, treeId);
    }

    /**
     * 根据古树id删除图片
     * @param ids
     */
    @Override
    public void deleteByTreeId(Integer[] ids) {
        treeMediaMapper.deleteByTreeId(ids);
    }
}
